include "icontype.inc"
include "32x32\icon32x32.inc"

proc draw_icon,x,y,name
   pusha
   mov	   esi,[name]
   mov	   edi,bmp
   mov	   eax,8
   int	   0x90

   mov al,[bmp+head.size+ientry.size+infoheader.Width]
   mov [icon_xsize],al
   mov al,[bmp+head.size+ientry.size+infoheader.Height]
   mov [icon_ysize],al
   cmp [icon_xsize],16
   jne .@no_16
   ;stdcall  draw_icon_16x16,[x],[y]
   jmp .@end
.@no_16:
   cmp [icon_xsize],32
   jne .@no_32
   stdcall  draw_icon_32x32,[x],[y]
   jmp .@end
.@no_32:
   cmp [icon_xsize],48
   jne .@no_48
   ;stdcall  draw_icon_48x48,[x],[y]
   jmp .@end
.@no_48:
.@end:
   popa
   ret
endp

